public class ParttimeEmployee implements Employee {
    private int weeklyHours;
    private double hourlyRate;


    @Override
    public void accept(Department department) {
        department.visit(this);
    }

    public double calculateSalary() {
        return weeklyHours * hourlyRate;
    }
    public int getWeeklyHours() {
        return weeklyHours;
    }
}